import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import NoPermission from './views/403.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
// ====================引入自定义组件========================
// ====================引入组织结构组件========================
import department from "./views/department/department";

// ====================引入权限组件========================

import permission from "./views/auth/permission";
import role from "./views/auth/role";

// ====================引入系统组件========================
import sysConfig from "./views/sys/sysConfig";

let routes = [
    {
        path: '/',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },

    {
        path: '/403',
        component: Home,
        name: '首页',
        hidden: true,
        iconCls: 'fa fa-bar-chart',
        leaf: true,//只有一个节点  叶子只有一片叶子
        children: [
            { path: '/403', component: NoPermission, name: '无权访问', hidden: true   }
        ]
    },
    //{ path: '/main', component: Main },
    {
        path: '/echarts',
        component: Home,
        name: '首页',
        iconCls: 'fa fa-bar-chart',
        leaf: true,//只有一个节点  叶子只有一片叶子
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构模块',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: department, name: '部门列表' },

        ]
    },
    {
        path: '/',
        component: Home,
        name: '权限模块',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/permission', component: permission, name: '权限列表' },
            { path: '/role', component: role, name: '角色列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统模块',
        iconCls: 'el-icon-message',//图标样式class
        children: [

            { path: '/sysConfig', component: sysConfig, name: '系统配置' },
        ]
    },





    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;